libxl: prevent creation of domains with duplicate names
authorIan Jackson <Ian.Jackson@eu.citrix.com>
Fri, 28 Jan 2011 18:39:09 +0000 (18:39 +0000)
committerIan Jackson <Ian.Jackson@eu.citrix.com>
Fri, 28 Jan 2011 18:39:09 +0000 (18:39 +0000)
commit36ac3bcd564975302e6e6df556b854687c0d1f93
tree97e8aac0189381c01a0535947db20ee2477091ee
parentefdadb8156974e75bd2aa6eb61a69a4becf84bb0
libxl: prevent creation of domains with duplicate names

libxl_domain_rename is where domain names are assigned.  Therefore
this is where we check that no two domains have the same name.  As a
special exception, domains whose names are "" are not considered to
clash.

We also take special care not to mind if we try to rename a domain to
the name it already has.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
tools/libxl/libxl.c
tools/libxl/libxl_create.c